package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataScope;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.YhGasCylindersMapper;
import com.ruoyi.system.domain.YhGasCylinders;
import com.ruoyi.system.service.IYhGasCylindersService;

/**
 * 气瓶信息Service业务层处理
 *
 * @author ruoyi
 * @date 2022-11-07
 */
@Service
public class YhGasCylindersServiceImpl implements IYhGasCylindersService
{
    @Autowired
    private YhGasCylindersMapper yhGasCylindersMapper;

    /**
     * 查询气瓶信息
     *
     * @param id 气瓶信息主键
     * @return 气瓶信息
     */
    @Override
    public YhGasCylinders selectYhGasCylindersById(Long id)
    {
        return yhGasCylindersMapper.selectYhGasCylindersById(id);
    }

    /**
     * 查询气瓶信息列表
     *
     * @param yhGasCylinders 气瓶信息
     * @return 气瓶信息
     */
    @Override
    @DataScope(deptAlias = "yh_gas_cylinders",userAlias = "yh_gas_cylinders")
    public List<YhGasCylinders> selectYhGasCylindersList(YhGasCylinders yhGasCylinders)
    {
        return yhGasCylindersMapper.selectYhGasCylindersList(yhGasCylinders);
    }

    /**
     * 新增气瓶信息
     *
     * @param yhGasCylinders 气瓶信息
     * @return 结果
     */
    @Override
    public int insertYhGasCylinders(YhGasCylinders yhGasCylinders)
    {
        return yhGasCylindersMapper.insertYhGasCylinders(yhGasCylinders);
    }

    @Override
    public int updateYhGasCylinders(YhGasCylinders yhGasCylinders) {
        return 0;
    }

    /**
     * 修改气瓶信息
     *
     * @param yhGasCylinders 气瓶信息
     * @return 结果
     */
    @Override
    public int updateYhGasCylindersyzx(YhGasCylinders yhGasCylinders)
    {
        return yhGasCylindersMapper.updateYhGasCylindersyzx(yhGasCylinders);
    }
    @Override
    public int updateYhGasCylinders1(YhGasCylinders yhGasCylinders) {
        return  yhGasCylindersMapper.updateYhGasCylinders1(yhGasCylinders);
    }

    @Override
    @DataScope(deptAlias = "yh_gas_cylinders", userAlias = "yh_gas_cylinders")
    public List<YhGasCylinders> selectYhGasCylindersList1(YhGasCylinders yhGasCylinders) {
        return yhGasCylindersMapper.selectYhGasCylindersList1(yhGasCylinders);
    }

    @Override
    public YhGasCylinders selectYhGasCylindersByBuild(Long id) {
        return yhGasCylindersMapper.selectYhGasCylindersByBuild(id);
    }


    /**
     * 批量删除气瓶信息
     *
     * @param ids 需要删除的气瓶信息主键
     * @return 结果
     */
    @Override
    public int deleteYhGasCylindersByIds(Long[] ids)
    {
        return yhGasCylindersMapper.deleteYhGasCylindersByIds(ids);
    }

    /**
     * 删除气瓶信息信息
     *
     * @param id 气瓶信息主键
     * @return 结果
     */
    @Override
    public int deleteYhGasCylindersById(Long id)
    {
        return yhGasCylindersMapper.deleteYhGasCylindersById(id);
    }

    @Override
    public int insertYhFilling(YhGasCylinders yhGasCylinders) {
        return yhGasCylindersMapper.insertYhGasCylinders(yhGasCylinders);
    }



}
